package com.bamboo.eduorder.feign;

import com.bamboo.eduorder.entity.dto.CourseWebVo;
import com.bamboo.eduorder.feign.fallback.CourseFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author jack.wu
 * @version 1.0
 * @date 2020-07-20
 */
@FeignClient(value = "service-edu", fallback = CourseFeignClientFallback.class)
public interface CourseFeignClient {

    /**
     * 根据课程id查询课程基础信息
     * @param id 课程id
     * @return 课程基础信息
     */
    @GetMapping("course/{id}")
    CourseWebVo getCourseInfo(@PathVariable String id);

}
